home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
TCL1
/
__MANDEL
/
MANDELBR
/
CROOTSCA.C
< prev
next >
Wrap
Text File
|
1992-03-28
|
900b
|
43 lines
/* CRootScaleDialog.c */
#include "CMandelApp.h"
#include <Commands.h>
#include <CFloatText.h>
#include "CRootScaleDialog.h"
#include "CMandelDoc.h"
#include <CWindow.h>
void CRootScaleDialog::IRootScaleDialog( short DLOGid,
CMandelDoc *aMandelDoc,
CDirectorOwner *aSupervisor)
{
CFloatText *aEditItem;
IDLOGDirector(DLOGid, aSupervisor);
FailNIL(aMandelDoc);
itsMandelDoc = aMandelDoc;
aEditItem = (CFloatText *)itsWindow->FindViewByID(3/*kRootScaleEdit*/);
aEditItem->SetFloatValue(itsMandelDoc->itsRootScale);
}
void CRootScaleDialog::DoCommand(long aCmd)
{
CFloatText *aEditItem;
switch (aCmd)
{
case cmdOK:
if (Validate())
{
aEditItem = (CFloatText *)itsWindow->FindViewByID(3);
itsMandelDoc->itsRootScale = aEditItem->GetFloatValue();
itsMandelDoc->DoImage();
}
break;
default:
inherited::DoCommand(aCmd);
break;
}
}